home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / misc / zxam16b.lha / ZXAM Spectrum / zxam_rexx / English / ShowScreen.zxam < prev   
Encoding:
Text File  |  1995-01-21  |  3.0 KB  |  89 lines

  1. /* this script shows the actual Spectrum's screen */
  2.     
  3.     address command
  4.     
  5.     if ~show(ports,ZXAM_REXX) then do
  6.         requestchoice 'title "ZXAM Script error..." body "I can''t find the emulator''s port!!" gadgets "AARGH!"'
  7.         exit 0
  8.         end
  9.  
  10. /* open file */
  11.  
  12.     if ~OPEN('fichero','t:zxamscreen.tmp','Write') then exit 0
  13.     
  14. /* ID header */
  15.     dummy=writech('fichero','FORM')
  16.     dummy=writech('fichero','000060a8'x)    /* total size */
  17.     dummy=writech('fichero','ILBM')
  18.  
  19. /* chunk ANNO */
  20.     dummy=writech('fichero','ANNO')
  21.     dummy=writech('fichero','00000033'x)    /* size 51 chars */
  22.     dummy=writech('fichero','Saved by ZXAM Spectrum Emulator AGA (by Toni Pomar)')
  23.     dummy=writech('fichero','00'x)        /* pad to align */
  24.  
  25. /* chunk BMHD */
  26.     dummy=writech('fichero','BMHD')
  27.     dummy=writech('fichero','00000014'x)    /* size 20 */
  28.     dummy=writech('fichero','0100'x)    /* width */
  29.     dummy=writech('fichero','00c0'x)    /* height */
  30.     dummy=writech('fichero','0000'x)    /* pos x */
  31.     dummy=writech('fichero','0000'x)    /* pos y */
  32.     dummy=writech('fichero','04'x)        /* nro bitplanes */
  33.     dummy=writech('fichero','00'x)        /* masking */
  34.     dummy=writech('fichero','00'x)        /* compression */
  35.     dummy=writech('fichero','00'x)        /* Pad1 */
  36.     dummy=writech('fichero','0000'x)    /* transparent color */
  37.     dummy=writech('fichero','2c2c'x)    /* aspect 44:44 */
  38.     dummy=writech('fichero','0140'x)    /* width source page (320) */
  39.     dummy=writech('fichero','0100'x)    /* heigth source page (256) */
  40.  
  41. /* chunk CAMG */
  42.     dummy=writech('fichero','CAMG')
  43.     dummy=writech('fichero','00000004'x)    /* size 4 */
  44.     dummy=writech('fichero','00000000'x)    /* 00021000 = PAL:Lo-res */
  45.  
  46. /* chunk CMAP */
  47.  
  48.     dummy=writech('fichero','CMAP')
  49.     dummy=writech('fichero','00000030'x)    /* size 48 (16 colors*3 bytes) */
  50.     
  51.     /* border color */
  52.     /* color 0 to 7 acts as an index to acces to the array */
  53.     dummy=writech('fichero',x2c(substr('000000000099990000990099009900009999999900999999',(zxamgetreg(bor)*6)+1,6)))
  54.     
  55.     dummy=writech('fichero','000099'x)    /* color 1 */
  56.     dummy=writech('fichero','990000'x)    /* color 2 */
  57.     dummy=writech('fichero','990099'x)    /* color 3 */
  58.     dummy=writech('fichero','009900'x)    /* color 4 */
  59.     dummy=writech('fichero','009999'x)    /* color 5 */
  60.     dummy=writech('fichero','999900'x)    /* color 6 */
  61.     dummy=writech('fichero','999999'x)    /* color 7 */
  62.     dummy=writech('fichero','000000'x)    /* color 8 */
  63.     dummy=writech('fichero','0000aa'x)    /* color 9 */
  64.     dummy=writech('fichero','bb0000'x)    /* color 10 */
  65.     dummy=writech('fichero','cc00cc'x)    /* color 11 */
  66.     dummy=writech('fichero','00cc00'x)    /* color 12 */
  67.     dummy=writech('fichero','00dddd'x)    /* color 13 */
  68.     dummy=writech('fichero','eeee00'x)    /* color 14 */
  69.     dummy=writech('fichero','ffffff'x)    /* color 15 */
  70.     
  71.  
  72. /* chunk BODY */
  73.  
  74.     dummy=writech('fichero','BODY')
  75.     dummy=writech('fichero','00006000'x)    /* size 6144*4 (4 bpls of 256*192) */
  76.  
  77. /* we use a special emulator's function to extract and convert to bitplanes */
  78.  
  79.     dummy=writech('fichero',zxamgetscr())
  80.  
  81.     dummy=close('fichero')
  82.     
  83.     address command
  84.  
  85.     'sys:utilities/multiview <nil: >nil: t:zxamscreen.tmp window'
  86.     
  87.     'delete t:zxamscreen.tmp'
  88.  
  89.